public class Student {
        private String name;
        private String studentId;
        private String className;
        private String gender;
        private int age;
        private String personality;

        // 构造函数
        public Student(String name, String studentId, String className, String gender, int age, String personality) {
            this.name = name;
            this.studentId = studentId;
            this.className = className;
            this.gender = gender;
            this.age = age;
            this.personality = personality;
        }

        // 获取姓名的方法
        public String getName() {
            return name;
        }

        // 获取学号的方法
        public String getStudentId() {
            return studentId;
        }

        // 获取班级的方法
        public String getClassName() {
            return className;
        }

        // 获取性别的方法
        public String getGender() {
            return gender;
        }

        // 获取年龄的方法
        public int getAge() {
            return age;
        }

        // 获取性格的方法
        public String getPersonality() {
            return personality;
        }

        // 信息概要方法
        public String getInfoSummary() {
            return "姓名：" + name + "，学号：" + studentId + "，班级：" + className + "，性别：" + gender + "，年龄：" + age + "，性格：" + personality;
        }

        public static void main(String[] args) {
            Student student1 = new Student("张三", "2024001", "一班", "男", 18, "开朗");
            Student student2 = new Student("李四", "2024002", "二班", "女", 19, "文静");
            Student student3 = new Student("王五", "2024003", "三班", "男", 20, "活泼");

            System.out.println(student1.getInfoSummary());
            System.out.println(student2.getInfoSummary());
            System.out.println(student3.getInfoSummary());
        }
    
}
